{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": 6,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "QBdtwI_SlOvF",
        "outputId": "0b887464-05d1-417d-b0a5-854b12158f38"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "Requirement already satisfied: cudaq==0.9.1 in /usr/local/lib/python3.10/dist-packages (0.9.1)\n",
            "Requirement already satisfied: cuda-quantum-cu12==0.9.1 in /usr/local/lib/python3.10/dist-packages (from cudaq==0.9.1) (0.9.1)\n",
            "Requirement already satisfied: astpretty~=3.0 in /usr/local/lib/python3.10/dist-packages (from cuda-quantum-cu12==0.9.1->cudaq==0.9.1) (3.0.0)\n",
            "Requirement already satisfied: cuquantum-python-cu12>=24.11 in /usr/local/lib/python3.10/dist-packages (from cuda-quantum-cu12==0.9.1->cudaq==0.9.1) (24.11.0)\n",
            "Requirement already satisfied: numpy>=1.24 in /usr/local/lib/python3.10/dist-packages (from cuda-quantum-cu12==0.9.1->cudaq==0.9.1) (1.26.4)\n",
            "Requirement already satisfied: scipy>=1.10.1 in /usr/local/lib/python3.10/dist-packages (from cuda-quantum-cu12==0.9.1->cudaq==0.9.1) (1.13.1)\n",
            "Requirement already satisfied: requests>=2.31 in /usr/local/lib/python3.10/dist-packages (from cuda-quantum-cu12==0.9.1->cudaq==0.9.1) (2.32.3)\n",
            "Requirement already satisfied: nvidia-cublas-cu12~=12.0 in /usr/local/lib/python3.10/dist-packages (from cuda-quantum-cu12==0.9.1->cudaq==0.9.1) (12.6.4.1)\n",
            "Requirement already satisfied: nvidia-cuda-runtime-cu12~=12.0 in /usr/local/lib/python3.10/dist-packages (from cuda-quantum-cu12==0.9.1->cudaq==0.9.1) (12.6.77)\n",
            "Requirement already satisfied: nvidia-cusolver-cu12~=11.4 in /usr/local/lib/python3.10/dist-packages (from cuda-quantum-cu12==0.9.1->cudaq==0.9.1) (11.7.1.2)\n",
            "Requirement already satisfied: nvidia-cuda-nvrtc-cu12~=12.0 in /usr/local/lib/python3.10/dist-packages (from cuda-quantum-cu12==0.9.1->cudaq==0.9.1) (12.6.85)\n",
            "Requirement already satisfied: custatevec-cu12~=1.7 in /usr/local/lib/python3.10/dist-packages (from cuquantum-python-cu12>=24.11->cuda-quantum-cu12==0.9.1->cudaq==0.9.1) (1.7.0)\n",
            "Requirement already satisfied: cutensornet-cu12~=2.6 in /usr/local/lib/python3.10/dist-packages (from cuquantum-python-cu12>=24.11->cuda-quantum-cu12==0.9.1->cudaq==0.9.1) (2.6.0)\n",
            "Requirement already satisfied: cudensitymat-cu12~=0.0.5 in /usr/local/lib/python3.10/dist-packages (from cuquantum-python-cu12>=24.11->cuda-quantum-cu12==0.9.1->cudaq==0.9.1) (0.0.5)\n",
            "Requirement already satisfied: cupy-cuda12x>=13.0 in /usr/local/lib/python3.10/dist-packages (from cuquantum-python-cu12>=24.11->cuda-quantum-cu12==0.9.1->cudaq==0.9.1) (13.3.0)\n",
            "Requirement already satisfied: nvidia-nvjitlink-cu12 in /usr/local/lib/python3.10/dist-packages (from nvidia-cusolver-cu12~=11.4->cuda-quantum-cu12==0.9.1->cudaq==0.9.1) (12.6.85)\n",
            "Requirement already satisfied: nvidia-cusparse-cu12 in /usr/local/lib/python3.10/dist-packages (from nvidia-cusolver-cu12~=11.4->cuda-quantum-cu12==0.9.1->cudaq==0.9.1) (12.5.4.2)\n",
            "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.31->cuda-quantum-cu12==0.9.1->cudaq==0.9.1) (3.4.0)\n",
            "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.31->cuda-quantum-cu12==0.9.1->cudaq==0.9.1) (3.10)\n",
            "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.31->cuda-quantum-cu12==0.9.1->cudaq==0.9.1) (2.2.3)\n",
            "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.31->cuda-quantum-cu12==0.9.1->cudaq==0.9.1) (2024.12.14)\n",
            "Requirement already satisfied: cutensor-cu12<3,>=2.0.2 in /usr/local/lib/python3.10/dist-packages (from cudensitymat-cu12~=0.0.5->cuquantum-python-cu12>=24.11->cuda-quantum-cu12==0.9.1->cudaq==0.9.1) (2.0.2)\n",
            "Requirement already satisfied: fastrlock>=0.5 in /usr/local/lib/python3.10/dist-packages (from cupy-cuda12x>=13.0->cuquantum-python-cu12>=24.11->cuda-quantum-cu12==0.9.1->cudaq==0.9.1) (0.8.3)\n"
          ]
        }
      ],
      "source": [
        "!pip install cudaq==0.9.1"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "n7QSfJTd6mfZ"
      },
      "source": [
        "Sampling a dephasing channel with mid-circuit measurement"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 7,
      "metadata": {
        "id": "ZWAI_7o7lJlq"
      },
      "outputs": [],
      "source": [
        "import cudaq\n",
        "import numpy as np\n",
        "import matplotlib.pyplot as plt\n",
        "\n",
        "@cudaq.kernel\n",
        "def dephasing_channel(theta:float, t: int):\n",
        "    q = cudaq.qvector(10)\n",
        "\n",
        "    h(q)\n",
        "    for _ in range(t):\n",
        "        ry.ctrl(theta,q[0],q[1])\n",
        "        q1 = mz(q[1])\n",
        "        if q1:\n",
        "            reset(q[1]) # reset the target qubit\n",
        "    h(q[0])\n",
        "\n",
        "    # measure the ctrl qubit\n",
        "    mz(q[0])\n",
        "\n",
        "p = 0.1 # dephasing probability\n",
        "theta = float(2*np.arccos(np.sqrt(1-p))) # transform the dephasing probability to the rotation angle\n",
        "shots = 2048\n",
        "steps = 20 # number of time steps\n",
        "\n",
        "#print(cudaq.draw(dephasing_channel, theta, 3))"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 8,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "jenAUv29lV1j",
        "outputId": "d1c5d2f2-426f-4d4f-f1b3-0aa25c364dab"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "80.51396322250366\n"
          ]
        }
      ],
      "source": [
        "import time\n",
        "\n",
        "cudaq.set_target('nvidia')\n",
        "#cudaq.set_target('qpp-cpu')\n",
        "\n",
        "prob_0 = [] # list to store the probability of measuring 0\n",
        "t0 = time.time()\n",
        "for t in range(steps):\n",
        "    counts = cudaq.sample(dephasing_channel, theta, t, shots_count=shots)\n",
        "    counts = dict(counts.items())\n",
        "    prob_0.append(counts['0']/shots)\n",
        "print(time.time()-t0)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 9,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 420
        },
        "id": "ENuKak_v5h1n",
        "outputId": "74e6eef9-031a-4685-959d-de005c99a167"
      },
      "outputs": [
        {
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAegAAAGTCAYAAADjtYEOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAABOvAAATrwFj5o7DAABJQ0lEQVR4nO3deVxU5f4H8M/MMAwMqyyCjMgiKi4YKuAugmmKmkkqmVlmYdf0aka23kpLWyyT0Lo3yaulN6+S3TasLPcVUMSUxQUBcVAWcUGHYZvz+wOZnB+LCANzhM/79ZqXzHPOc853Junj2Z5HIgiCACIiIhIVqakLICIiotoY0ERERCLEgCYiIhIhBjQREZEIMaCJiIhEiAFNREQkQgxoIiIiEWJAExERiRADmoiISIQY0ERERCLEgCYiIhIhBjQREZEIMaCJTMDT0xMSiUT/kslksLe3h7e3NyZNmoSPPvoI+fn5pi5TX6fYSCQSeHp6mroMohYl4WxWRK3P09MTOTk5eOihh+Dq6goAuHnzJvLy8nD8+HFotVrI5XK88cYb+Mc//gGZTGbSOsX2vwmJRAIPDw9kZ2ebuhSiFmNm6gKI2r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go11Gq1QVtqauo9b4eIiKixjBbQH3zwAcaMGYOBAwfiySefNMo28/Ly4OTkBIVCUWuZSqXCoUOHUFVV1eDz1+vXr8ehQ4eadVNYbGwsli5d2uT+RERE98poAb148WLY29vj6aefxksvvQRvb28olUqDdSQSCXbu3NnobWo0mjrDGag+igaqn7G2trauc52ioiIsXrwYixYt0j/21RSRkZEICwszaEtNTcXs2bObvE0iIqKGGC2gz58/D4lEgi5dugAA8vPzm71NpVKJgoKCOpdptVoAgKWlZb39Fy9eDEtLS7z11lvNqkOlUkGlUjVrG0RERPfCKAGt0+lw5MgR2Nvb649sjcHNzQ1paWkoKyurdSStVqvh6upa7+ntY8eOYcOGDVixYgUuXbqkby8uLgYA5ObmwtraGl27dm30o1pEREStpdl3cS9fvhwODg5QqVSws7PD9OnTcfPmTWPUhsDAQOh0OiQmJhq0a7VapKSkICAgoN6+ubm5AICXX34Z3bp1079Wr14NAHj44YfRrVs3lJWVGaVWIiIiY2rWEfT69evx5ptvQqlUon///sjNzcXWrVshl8vx9ddfN7u4iIgIvPfee4iOjsbw4cP17bGxsdBoNJgxY4a+LTMzExUVFfD19QVQfVd5XFxcrW1u3boVcXFx+Oijj+Dp6Qlzc/Nm10lERGRszQro2NhYeHh44ODBg3Bzc0NFRQUiIiKwZcsWfP755/XevNVYfn5+mDdvHtasWYPw8HCEhYUhPT0dMTExCA0NRUREhH7dUaNGIScnB4IgAKg+PT5lypRa2zx16hQA4MEHH4S/v3+z6iMiImopzTrFnZqaisjISLi5uQGonlLyjTfeQEVFBdLT041SYHR0ND7++GOkpqZi3rx52LJlCxYuXIgff/yR146JiKjNatYRdElJif6u7RoeHh4AYLTr0DKZDFFRUYiKimpwvezs7EZtb8mSJU0arISIiKg1NfsmManUcBM1R7U1p5qJiIjo3jX7MavffvsNRUVF+ve3bt2CRCLBd999p7/ee6cFCxY0d5dERERtXrMDeuPGjdi4cWOt9s8//7xWm0QiYUATERE1QrMCevfu3caqg4iIiO7QrIAODg42Vh1ERER0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NWm729PTp16gRzc/Na7QBQXFwMAEhPTwcAvPHGG3B2djZ49ejRAwCQn5/fcsUTiRjv4iaiZpHJZPfUDvz1XLVOpwMAvPzyyxg9enSd67q5uTWzQqL7EwOaiEymW7duAAC5XI4HH3zQxNUQiQtPcRORyfTv3x+9evXC559/jtzc3FrLtVqt/no1UXvDI2giMhmJRIKvv/4ao0aNQp8+ffDMM8/A19cXN27cwOnTp7Ft2zZ89913HAOc2iUGNBGZ1IABA3D8+HEsX74c3377LS5fvgx7e3t4e3tj0aJF6Nu3r6lLJDIJiSBwFHwiIiKx4TVoIiIiEWJAExERiRADmoiISIQY0ERERCLEgCYiIhIhBjQREZEIMaCJiIhEiAFNREQkQgxoIiIiEWJAExERiRADmoiISIQY0ERERCLEgCYiIhIhBjQREZEIMaCJiIhE6P8A3ZB/HEKZy7YAAAAASUVORK5CYII=",
            "text/plain": [
              "<Figure size 512x384 with 1 Axes>"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "fig, ax = plt.subplots(figsize=(4,3), dpi=128)\n",
        "\n",
        "plt.title(\"Dephasing\")\n",
        "plt.plot(prob_0)\n",
        "plt.ylabel(\"Probability\")\n",
        "plt.xlabel(\"Time\")\n",
        "plt.ylim(0,1.05)\n",
        "plt.show()"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "37W0o77o60ZO"
      },
      "source": [
        "Other detailed usage of sampling quantum kernel with mid-circuit measurement"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 10,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "QjWmPy5-wmqa",
        "outputId": "deda732a-f5df-4fca-8d87-a9dd713d87b3"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "Global counts: { 0:1000 }\n",
            "\n",
            "midCircuit counts: { 0:522 1:478 }\n",
            "\n",
            "Items in result:\n",
            "0: 1000\n",
            "Counts for '0': 1000, Counts for '1': 0\n"
          ]
        }
      ],
      "source": [
        "import cudaq\n",
        "\n",
        "@cudaq.kernel\n",
        "def midCircMeasTest():\n",
        "    q = cudaq.qvector(1)\n",
        "    h(q)\n",
        "    midCircuit = mz(q)\n",
        "    h(q)\n",
        "\n",
        "# Perform sampling\n",
        "result = cudaq.sample(midCircMeasTest)\n",
        "\n",
        "# Access the `__global__` measurement counts\n",
        "global_counts = result.get_register_counts('__global__')\n",
        "print(\"Global counts:\", global_counts)\n",
        "\n",
        "# Access the `midCircuit` measurement counts\n",
        "midCircuit_counts = result.get_register_counts('midCircuit')\n",
        "print(\"midCircuit counts:\", midCircuit_counts)\n",
        "\n",
        "# Alternatively, iterate through `items` to see key-value pairs ('__global__' is default)\n",
        "print(\"Items in result:\")\n",
        "for bitstring, count in result.items():\n",
        "    print(f\"{bitstring}: {count}\")\n",
        "\n",
        "# Access individual counts with `count`\n",
        "zero_count = result.count(\"0\", \"__global__\")\n",
        "one_count = result.count(\"1\", \"__global__\")\n",
        "print(f\"Counts for '0': {zero_count}, Counts for '1': {one_count}\")"
      ]
    }
  ],
  "metadata": {
    "accelerator": "GPU",
    "colab": {
      "gpuType": "T4",
      "provenance": []
    },
    "kernelspec": {
      "display_name": "Python 3",
      "name": "python3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}
